﻿namespace LivePatterns
{
	using System;
	using System.Reflection;

	/// <summary>
	/// Provides data for the <see cref="INotifyMemberAccessed.MemberAccessed"/> event.
	/// </summary>
	public class MemberAccessedEventArgs : EventArgs
	{
		public MemberAccessedEventArgs(MethodBase method)
		{
			if (method == null)
				throw new ArgumentNullException("method");
			
			this.MethodInfo = method;
		}

		/// <summary>
		/// Gets the method that was invoked on the observed object.
		/// </summary>
		public MethodBase MethodInfo { get; private set; }
	}
}
